import AjaxSend from '@/pages/macro/ajax/http';
/**
 * @Template 服务模板示例
 * interface:{  定义请求的名称，请保持唯一
 *  method: string, 请求方式（get、delete、head、post、put、patch）
 *  requestUrl: string, 请求的服务地址（在接口地址中'不'包含参数下使用，例如：'api/v1/user/'）
 *  requestCommon: function, 请求的服务地址（在接口地址中包含参数下使用，例如：'api/v1/users/' + params + '/active'）
 *  requestPost: function  返回对象类型，可以自己定义。（主要用于post请求也需要在url上面传参的方式；例如：'api/v1/user?id=param'，同时也有在body传参）
 * }
 */
const PublicObjService = {
  catalogMenu: {
    requestUrl: '/maanalysis/macro/base/select/catalog',
    method: 'get'
  },
  macroTable: {
    requestUrl: '/maanalysis/macro/base/select/table',
    method: 'get'
  },
  macroIdenMenu:{
    requestUrl: '/maanalysis/macro/base/select/iden/menu',
    method: 'get'
  },
  macroIdenList:{
    requestUrl: '/maanalysis/macro/base/select/iden/list',
    method: 'get'
  },
  //查询指标关联分组值
  idenGroupList:{
    requestUrl: '/maanalysis/macro/base/select/idenvl/by/iden',
    method: 'get'
  },
  getMacroData:{
    requestUrl: '/maanalysis/micro/query/data/multi',
    method: 'post'
  },
  //获取报告期类型
  getReportType:{
    requestUrl: '/mianalysis/micro/base/select/report/type',
    method: 'get'
  },
  //获取区划详细情况
  getRegionInfo:{
    requestUrl: '/region/region/info/query/regionByCodes',
    method: 'get'
  },
  //获取收藏条件
  getAchievementByType:{
    requestUrl: '/maanalysis/macro/achievement/select/achievement/by/type',
    method: 'get'
  },
  deleteAchievementById:{
    requestUrl: '/maanalysis/macro/achievement/delete/achievement/by/id',
    method: 'delete'
  },
  addAchievement:{
    requestUrl: '/maanalysis/macro/achievement/add/achievement',
    method: 'post'
  },
  getAchievementInfoById:{
    requestUrl: '/maanalysis/macro/achievement/select/achievement/by/id',
    method: 'get'
  },
 

};

AjaxSend.loopServiceApi(PublicObjService);
export function getAchievementInfoById(params) {
  return PublicObjService.getAchievementInfoById.send(params);
}
export function addAchievement(params) {
  return PublicObjService.addAchievement.send(params);
}
export function deleteAchievementById(params) {
  return PublicObjService.deleteAchievementById.send(params);
}
export function getAchievementByType(params) {
  return PublicObjService.getAchievementByType.send(params);
}
export function catalogMenu(params) {
  return PublicObjService.catalogMenu.send(params);
}
export function macroTable(params) {
    return PublicObjService.macroTable.send(params);
}
export function macroIdenMenu(params) {
    return PublicObjService.macroIdenMenu.send(params);
}
export function macroIdenList(params) {
  return PublicObjService.macroIdenList.send(params);
}
export function idenGroupList(params) {
  return PublicObjService.idenGroupList.send(params);
}
export function getMacroData() {
  return PublicObjService.getMacroData;
}
export function getReportType() {
  return PublicObjService.getReportType;
}
export function getRegionInfo(params) {
  return PublicObjService.getRegionInfo.send(params);
}